Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to use import and export in test files #863

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

KuznetsovRoman
Copy link
Member

What is done

  • Add ability to use "import" and "export" statements in tests

https://www.typescriptlang.org/tsconfig/#allowJs

@@ -27,6 +27,9 @@ export const tryToRegisterTsNode = (): void => {
skipProject: JSON.parse(skipProjectRaw),
transpileOnly: JSON.parse(transpileOnlyRaw),
swc: JSON.parse(swcRaw),
compilerOptions: {
allowJs: true,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gives ability to use import/export inside tests on javascript?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use ts-node, yes

@KuznetsovRoman KuznetsovRoman force-pushed the HERMIONE-1427.import_export_ts branch from e70cc61 to 8bb43e7 Compare March 12, 2024 11:23
@KuznetsovRoman KuznetsovRoman merged commit 6f4282a into master Mar 12, 2024
2 checks passed
@KuznetsovRoman KuznetsovRoman deleted the HERMIONE-1427.import_export_ts branch March 12, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants